//
//  Image.h
//  Prism
//
//  Created by Bas du Pre on 16-05-11.
//  Copyright 2011 UU. All rights reserved.
//

#pragma once

#include "../global.h"

#include "../File.h"

namespace Prism {
namespace Graphics {
        
    class Texture : public PObject {
        Texture();
    public:
        Texture(String filename);
        Texture(File *file);
        Texture(File &file);
        virtual ~Texture();
        
        File *file();
        
        Size size();
        
        virtual String toString();
        
        Size native_size();
        
        void setAntiAlias(bool antiAlias);
        bool antiAlias();
        
    protected:
        File *_file;
        bool myFile;
        
        bool _antiAlias;
        
        void load(File &file);
        void load(File *file);
        void load(String filename);
        
        void native_setAntiAlias(bool antiAlias);
        
    private:
    #if PRISM_OS_IOS && PRISM_BUILDENGINE
    #include "iOS/ios_Texture.h"
    #elif PRISM_TARGET_SDL
    #include "sdl/sdl_Texture.h"
    #endif
        
    };
}
}
